

export default function request(url, method, data,token) {
	return new Promise((resolve, reject) => {
		uni.request({
			url: '' + url,
			method: method ? method : 'GET',
			data: data ? data : null,
			header:{
				token:token?token : null
			},
			success: res => {
				resolve(res)
			},
			fail: err => {
				reject(err)
			}
		})
	})
}
